package sg.edu.nus.iss.vmcs.termination.template;

import java.util.Observable;

import sg.edu.nus.iss.vmcs.customer.CoinReceiver;

/*
 * 
 * Priyanka
 */

public class TerminationOnChangeGiving extends Termination{
	
	CoinReceiver coinReceiver;
	
	public TerminationOnChangeGiving(Observable coinReceiver2) {
		super();
		this.coinReceiver = (CoinReceiver)coinReceiver2;
	}
	
	@Override
	protected void CallUseCase() {
		
		System.out.println("Template Method : Termination on DispenseChange state");
		storeCash();
		
	}

	private void storeCash() {
		coinReceiver.storeCash();		
	}

}
